home *** CD-ROM | disk | FTP | other *** search
- package com.ibm.xml.parser;
-
- import java.util.BitSet;
-
- public class CM1op extends CMNode {
- static final long serialVersionUID = -7652557073411492117L;
- int type;
- CMNode node;
-
- public CM1op(int var1, CMNode var2) {
- this.type = var1;
- this.node = var2;
- }
-
- public int getType() {
- return this.type;
- }
-
- public CMNode getNode() {
- return this.node;
- }
-
- public void setNode(CMNode var1) {
- this.node = var1;
- }
-
- public String toString() {
- return this.node.toString() + (char)this.type;
- }
-
- boolean nullable() {
- if (super.nullable == null) {
- boolean var1 = false;
- switch (this.type) {
- case 42:
- var1 = true;
- break;
- case 43:
- var1 = this.node.nullable();
- break;
- case 63:
- var1 = true;
- }
-
- super.nullable = new Boolean(var1);
- }
-
- return super.nullable;
- }
-
- CMNode cloneNode() {
- return new CM1op(this.type, this.node.cloneNode());
- }
-
- BitSet firstpos() {
- if (super.firstPos == null) {
- super.firstPos = this.node.firstpos();
- }
-
- return super.firstPos;
- }
-
- BitSet lastpos() {
- if (super.lastPos == null) {
- super.lastPos = this.node.lastpos();
- }
-
- return super.lastPos;
- }
-
- void prepare(int var1) {
- this.node.prepare(var1);
- }
-
- void setFollowpos(BitSet[] var1) throws LibraryException {
- this.node.setFollowpos(var1);
- if (this.type == 43) {
- throw new LibraryException("com.ibm.xml.parser.CM1op#setFollowpos(): This method should not have been called for plus (+) operator.");
- } else {
- if (this.type == 42) {
- for(int var2 = 0; var2 < var1.length; ++var2) {
- if (this.lastpos().get(var2)) {
- var1[var2].or(this.firstpos());
- }
- }
- }
-
- }
- }
-
- public boolean equals(Object var1) {
- if (var1 == null) {
- return false;
- } else if (!(var1 instanceof CM1op)) {
- return false;
- } else {
- CM1op var2 = (CM1op)var1;
- return var2.getType() != this.getType() ? false : var2.getNode().equals(this.getNode());
- }
- }
-
- public int hashCode() {
- return this.getNode().hashCode();
- }
- }
-